#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os
import sys
import json

sys.path.append(
    os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "qtrade")
)

import requests

# 测试
base_url = "http://localhost:8000/strategy/"

headers = {
}


def test_get_all_strategy():
    url = base_url
    res = requests.get(url)
    content = json.loads(res.content)
    print(content)


def test_get_strategy_statistic():
    url = base_url + 'statistic'
    res = requests.get(url)
    content = json.loads(res.content)
    print(content)


def test_trigger_stock():
    url = base_url + '4/trigger_stock'
    res = requests.get(url)
    content = json.loads(res.content)
    print(content)

def test_trigger_statistic():
    url = base_url + 'trigger/statistic'
    res = requests.get(url)
    content = json.loads(res.content)
    print(content)
